<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <!--<meta name="viewport" content="width=device-width, initial-scale=1">-->

      <title>课程 - 购买</title>
      <meta name="keywords" content="IT课程,公开课,在线教育,IT职业培训,云计算,大数据,互联网营销培训,网络课程,视频教程,编程开发,交互设计,互联网思维,幕课论坛,MOOC,视频课程,职场进修,慕课论坛,在线学习,学习平台,创业,物联网"/>
      <meta name="description" content="开课吧是关于云计算、大数据、互联网营销、交互设计、编程语言、移动设备等泛IT学科的在线课程，在线教育，职业培训平台。"/>



    <link data-turbolinks-track="true" href="css/application-259d88b7df3d30d7eec66f46114169d9.css" media="all" rel="stylesheet" />
    <link data-turbolinks-track="true" href="css/sign_in_modal-3160308d45c1acdf19162e7886744068.css" media="all" rel="stylesheet" />
    <link data-turbolinks-track="true" href="css/gaoxiaobang-da3a2db2fecddd160bc3e3c4a3a3bc38.css" media="all" rel="stylesheet" />
    <script data-turbolinks-track="true" src="js/application-fb8562c33e2e6c7d207653c10215fc91.js"></script>
    <meta content="authenticity_token" name="csrf-param" />
<meta content="EW2vm83570qbt7kTQ9Iv406jz2kGEL6a6Btw9m0hWv0=" name="csrf-token" />
	<link rel="apple-touch-icon" sizes="57x57" href="images/apple-touch-icon-57x57.png">
	<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
	<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
	<link rel="apple-touch-icon" sizes="144x144" href="images/apple-touch-icon-144x144.png">
	<link rel="apple-touch-icon" sizes="60x60" href="images/apple-touch-icon-60x60.png">
	<link rel="apple-touch-icon" sizes="120x120" href="images/apple-touch-icon-120x120.png">
	<link rel="apple-touch-icon" sizes="76x76" href="images/apple-touch-icon-76x76.png">
	<link rel="apple-touch-icon" sizes="152x152" href="images/apple-touch-icon-152x152.png">
	<link rel="apple-touch-icon" sizes="180x180" href="images/apple-touch-icon-180x180.png">
	<link rel="icon" type="image/png" href="images/favicon-192x192.png" sizes="192x192">
	<link rel="icon" type="image/png" href="images/favicon-160x160.png" sizes="160x160">
	<link rel="icon" type="image/png" href="images/favicon-96x96.png" sizes="96x96">
	<link rel="icon" type="image/png" href="images/favicon-16x16.png" sizes="16x16">
	<link rel="icon" type="image/png" href="images/favicon-32x32.png" sizes="32x32">
	<meta name="msapplication-TileColor" content="#ffffff">
	<meta name="msapplication-TileImage" content="/mstile-144x144.png">
    <!--[if lt IE 9]>
    <script src="js/html5shiv.min-f7427b1968f14d148d6c973339ec8bbb.js"></script>
<script src="js/respond.min-497dcd05a34f78a0295d8ba4cc5008df.js"></script>
    <![endif]-->
    <!--[if lte IE 9]>
    <script src="js/html5boilerplate-20c3bd30c07e9e58ea1042f1da27d6b7.js"></script>
<script src="js/jquery.placeholder-f99209ea3cff0a13a5ec10e1e69b243f.js"></script>
    <![endif]-->
    <script>
      var webApiUrl = "http://w.api.kaikeba.com";
      var mmLearnUrl = "http://class.kaikeba.com";
    </script>
  </head>
  <body>
  <!--<p class="notice"></p>-->
  <!--<p class="alert"></p>-->

    <header class="white-header" id="header">
  <div class="container">
    <div class="row">
      <div class="col-xs-12">
        <div class="pull-left">
          <div class="logo">
            <a href="index.html"><img alt="Logo color" data-at2x="/assets/images/logo-color@2x.png" src="images/logo-color.png" /></a>
            
          </div>
          <div class="dropdown">
            <a data-toggle="dropdown" href="course_list.html" class="btn btn-default">
              <span class="glyphicon glyphicon-align-justify"></span>
              课程
            </a>
            <div class="dropdown-menu course-catagory">
  <div class="catagory-links">
    <h6><span>发现课程</span></h6>
    <hr>
    <div class="row main-catagory">
      <div class="col-xs-4">
        <a href="/?discover=true">
          <span class="icon icon-selected-star"></span>
          &nbsp;&nbsp;发现课程
        </a>
      </div>
      <div class="col-xs-4">
        <a href="/courses?q%5Bs%5D=created_at+desc">
            <span class="icon icon-new"></span>
            &nbsp;&nbsp;最新课程
</a>      </div>
      <div class="col-xs-4">
        <!--<a href="/courses?q%5Bcertificate_type_eq%5D=enterprise">-->
            <!--<span class="icon icon-certificate-x"></span>-->
            <!--&nbsp;&nbsp;企业证书-->
        <!--</a>-->
      </div>
    </div>
    <h6><span>学科类别</span></h6>
    <hr>
    <div class="row sub-catagory">
          <div class="col-xs-3">
            <a href="/courses?q%5Bcategory_id_eq%5D=26" title="移动开发">移动开发</a>
          </div>
          <div class="col-xs-3">
            <a href="/courses?q%5Bcategory_id_eq%5D=1" title="云计算">云计算</a>
          </div>
          <div class="col-xs-3">
            <a href="/courses?q%5Bcategory_id_eq%5D=2" title="互联网营销">互联网营销</a>
          </div>
          <div class="col-xs-3">
            <a href="/courses?q%5Bcategory_id_eq%5D=3" title="交互设计">交互设计</a>
          </div>
          <div class="col-xs-3">
            <a href="/courses?q%5Bcategory_id_eq%5D=7" title="编程开发">编程开发</a>
          </div>
          <div class="col-xs-3">
            <a href="/courses?q%5Bcategory_id_eq%5D=6" title="大数据">大数据</a>
          </div>
          <div class="col-xs-3">
            <a href="/courses?q%5Bcategory_id_eq%5D=8" title="创新创业">创新创业</a>
          </div>
          <div class="col-xs-3">
            <a href="/courses?q%5Bcategory_id_eq%5D=12" title="办公软件">办公软件</a>
          </div>
          <div class="col-xs-3">
            <a href="/courses?q%5Bcategory_id_eq%5D=32" title="项目管理">项目管理</a>
          </div>
      <div class="col-xs-3">
        <a href="course_list.html">全部课程...</a>
      </div>
    </div>
  </div>
</div>
          </div>
          <div class="dropdown">
            <a href="http://u.kaikeba.com" class="btn btn btn-default">
              高校邦
            </a>
          </div>
          <div class="dropdown">
            <a href="http://w.kaikeba.com" target="_blank" class="btn btn btn-white-border">
              微专业
            </a>
          </div>
          <div class="dropdown">
            <a href="/topics/startupcollege" target="_blank" class="btn btn btn-white-border">
              创业微学院
            </a>
          </div>
          <div class="dropdown">
            <a href="http://bbs.kaikeba.com" target="_blank" class="btn btn btn-white-border">
              论坛
            </a>
          </div>
        </div>
        <div class="pull-right header-link">
          <style type="text/css" media="screen">
.dowe-menu-course{ width:336px; background:#fff;border-radius: 4px;box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);}
.dowe-menu-course-title{ height:40px; padding-left:20px; color:#879099; font-size:14px; line-height:40px;}
.dowe-menu-course-list a{ display:block; height:65px; padding:0 20px; text-decoration:none;}
.dowe-menu-course-list a:hover{ background:#F4F4F4;}
.listtitle{color: #606366;font-size: 14px;}
.listtime{ color: #b6bec6;font-size: 12px;}
.dowe-menu-course-list a ul{padding-top: 10px; border-top: 1px #EDEFF0 solid;}
.dowe-menu-course-list a ul li.classtitle{color: #b2b6b9;line-height: 30px;font-size: 12px; height: 30px;overflow: hidden;}
</style>
    <span id="my_course">
      <a href="/users/collections" onmouseover="style.color='#3690e0'" onmouseout="style.color='inherit'">
        <span>我的课程</span>
      </a>
        <div class="dowe-menu-course dropdown-menu" id="study_progression">
            <!-- <div class="dowe-menu-course-title">最近学习</div>
            <div class="dowe-menu-course-list">
                <a href="#">
                    <ul class="list-unstyled">
                      <li>
                          <dl class="dl-horizontal" style="margin-bottom: 4px;">
                              <dt class="listtitle" style="text-align: left;">响应式交互设计题目到这</dt>
                              <dd class="text-right listtime">10秒前学习</dd>
                            </dl>
                      </li>
                      <li class="classtitle">第三章 第4节 响应式web得有时和弊端</li>
                    </ul>
                </a>
            </div> -->
        </div>
    </span>
    <span class="dropdown">
      <a data-toggle="dropdown" href="#">
        <!--<img src="images/avatar.png" alt="avatar" class="header-avatar">-->
        <img alt="Avatar" class="header-avatar thumb_avatar" height="36" src="images/avatar.png?time=1428625589" width="36" />
        <span>hjl416148489</span>
        <span id="email" style="display: none;">416148489@qq.com</span>
        <span id="user_id" style="display: none;">934441</span>
        <span class="caret"></span>
      </a>
      <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
        <li><a href="http://www.kaikeba.com/users/my">个人中心</a></li>

        <li><a href="http://www.kaikeba.com/users/collections">我的课程</a></li>
        <li><a href="http://www.kaikeba.com/users/edit">设置</a></li>
        <li><a href="/users/sign_out">退出</a></li>
      </ul>
    </span>

<script>
  window.domain = 'kaikeba.com'
  var arrStr = document.cookie.split("; ");
  var access_token = null;
  for (var i=0; i < arrStr.length; i++) {
    if (arrStr[i].split("=")[0] === 'access_token') {
        access_token = unescape(arrStr[i].split("=")[1]);
    };
  };
  var kaikeba_lms_website = "http://class.kaikeba.com";
  if (access_token) {
      $.ajax({
          url : "http://w.api.kaikeba.com"+'/learn_log/'+access_token+'?size=5&school_code='+(window.location.host.split(".").length==3?window.location.host.split(".")[0]:''),
          type : 'GET',
          contentType : 'application/json',
          success : function(back){
              if (back.data.length) {
                  var htmls = '<div class="dowe-menu-course-title">最近学习</div>';
                  for (var i=0; i < back.data.length; i++) {
                      var hlink =  back.data[i]["school_code"] ? 'http://class.'+back.data[i]["school_code"]+'.kaikeba.com' : kaikeba_lms_website;
                    htmls += '<div class="dowe-menu-course-list">'
                        +'<a href="'+hlink+back.data[i]["redirect_uri"]+'">'
                            +'<ul class="list-unstyled">'
                              +'<li>'
                                  +'<dl class="dl-horizontal" style="margin-bottom: 4px;">'
                                      +'<dt class="listtitle" style="text-align: left;">'+back.data[i]["course_name"]+'</dt>'
                                      +'<dd class="text-right listtime">'+back.data[i]["last_time_str"]+'学习</dd>'
                                    +'</dl>'
                              +'</li>'
                              +'<li class="classtitle">'+back.data[i]["context_title"]+'</li>'
                            +'</ul>'
                        +'</a>'
                    +'</div>';
                  };
                  $('#study_progression').html(htmls);
              } else {
                  var htmls = '<div class="dowe-menu-course-title">最近学习</div>';
                  htmls += '<div class="dowe-menu-course-list" style="color:#333;text-align:center;">还没开始学习，来一课吧！</div>';
                  $('#study_progression').html(htmls);
              }
          }
      });
  };
  $('#my_course').hover(function(){
        $('#study_progression').stop(true,true).show('fast');
    },function(){
        $('#study_progression').stop(true,true).hide('fast');
    });
</script>


          <span>|</span>
          <span><a href="#" class="open-header-search"><span class="glyphicon glyphicon-search"></span></a></span>
        </div>
        <div class="pull-right header-search">
          <form accept-charset="UTF-8" action="course_list.html" autocomplete="off" class="header-search-form form-inline" method="get" role="form"><div style="display:none"><input name="utf8" type="hidden" value="&#x2713;" /></div>
              <div class="form-group">
                <label for="header-search" class="sr-only">搜索</label>
                <!--<input type="search" class="form-control" id="header-search" name="q[name_or_instructors_name_or_institution_name_cont]" placeholder="输入关键字">-->
                <!--TODO instructors_name affect the amount of searched courses  -->
                <input type="search" class="form-control" id="header-search" name="q[name_or_institution_name_cont]" placeholder="输入关键字">
                <a href="#" class="close-header-search">&times;</a>
              </div>
</form>        </div>
      </div>
    </div>
  </div>
</header>
<div class="header-occupation"></div>

<div class="payment sticky-footer-wrapper">
  <div class="payment-blk">
    <h3>购买课程</h3>
    <div class="inner clearfix">
      <div class="left">
        <h3> <a href="/courses/321">论文排版速成宝典                 （Word2013）</a> </h3>
        <a href="/courses/321"><img alt="Normal 1100003" class="img-responsive" src="images/normal_1100003.png" style="min-height: 140px" /></a>
      </div>
      <div class="right">
        <form accept-charset="UTF-8" action="/payments/pay_course"  method="post">
          <input name="authenticity_token" type="hidden" value="EW2vm83570qbt7kTQ9Iv406jz2kGEL6a6Btw9m0hWv0=" />
          <input type="hidden" id="lms_course_id" name="lms_course_id" value="239"/>
          <input type="hidden" id="lms_type" name="lms_type" value="kaikeba"/>
          <input type="hidden" id="course_id" name="course_id" value="321"/>
          <p class="hint">
            <span class="desc">需要您支付：</span><span class="money"> ￥ 29.9 </span></p>

          <p><span class="desc">请选择支付方式：</span></p>

          <div class="form-group radio-group">
            <label for="" class="sr-only">支付方式</label>
            <button type="button" class="btn btn-pay btn-lg radio-btn checked" data-value="alipay">
              <span class="payment-icon alipay"></span>支付宝支付
            </button>
            <button type="button" class="btn btn-pay btn-lg radio-btn" data-value="duihuanma">
              <span class="payment-icon duihuanma"></span>使用兑换码
            </button>
            <!--<button type="button" class="btn btn-pay btn-lg radio-btn" data-value="caifutong">-->
              <!--<span class="payment-icon caifutong"></span>财付通-->
            <!--</button>-->
            <!--<button type="button" class="btn btn-pay btn-lg radio-btn" data-value="" id="bank-selected">-->
              <!--<span class="content"><span class="payment-icon bank"></span>银行卡支付</span>-->

              <!--<div class="banks-blk">-->
                <!--<div class="banks-select">-->
                  <!--<div class="tip">-->
                    <!--<div class="tip-in"></div>-->
                  <!--</div>-->
                  <!--<ul class="list-inline bank-btn-list">-->
                    <!--<li>-->
                      <!--<div class="btn bank-selectable btn-bank btn-lg" data-value="bank1">-->
                        <!--<span class="bank-icon bank-abc"></span>工商银行-->
                      <!--</div>-->
                    <!--</li>-->
                    <!--<li>-->
                      <!--<div class="btn bank-selectable btn-bank btn-lg" data-value="bank2">-->
                        <!--<span class="bank-icon bank-boc"></span>建设银行-->
                      <!--</div>-->
                    <!--</li>-->
                    <!--<li>-->
                      <!--<div class="btn bank-selectable btn-bank btn-lg" data-value="bank3">-->
                        <!--<span class="bank-icon bank-bocom"></span>农业银行-->
                      <!--</div>-->
                    <!--</li>-->
                    <!--<li>-->
                      <!--<div class="btn bank-selectable btn-bank btn-lg" data-value="bank4">-->
                        <!--<span class="bank-icon bank-ccb"></span>中国银行-->
                      <!--</div>-->
                    <!--</li>-->
                    <!--<li>-->
                      <!--<div class="btn bank-selectable btn-bank btn-lg" data-value="bank5">-->
                        <!--<span class="bank-icon bank-cmb"></span>邮储银行-->
                      <!--</div>-->
                    <!--</li>-->
                    <!--<li>-->
                      <!--<div class="btn bank-selectable btn-bank btn-lg" data-value="bank6">-->
                        <!--<span class="bank-icon bank-cmbc"></span>招商银行-->
                      <!--</div>-->
                    <!--</li>-->
                    <!--<li>-->
                      <!--<div class="btn bank-selectable btn-bank btn-lg" data-value="bank7">-->
                        <!--<span class="bank-icon bank-icbc"></span>交通银行-->
                      <!--</div>-->
                    <!--</li>-->
                    <!--<li>-->
                      <!--<div class="btn bank-selectable btn-bank btn-lg" data-value="bank8">-->
                        <!--<span class="bank-icon bank-psbc"></span>民生银行-->
                      <!--</div>-->
                    <!--</li>-->
                  <!--</ul>-->

                  <!--<ul class="list-inline bank-text-list">-->
                    <!--<li>-->
                      <!--<div class="bank-selectable bank-text" data-value="bank9">中信银行</div>-->
                    <!--</li>-->
                    <!--<li>-->
                      <!--<div class="bank-selectable bank-text" data-value="bank10">华夏银行</div>-->
                    <!--</li>-->
                    <!--<li>-->
                      <!--<div class="bank-selectable bank-text" data-value="bank11">光大银行</div>-->
                    <!--</li>-->
                    <!--<li>-->
                      <!--<div class="bank-selectable bank-text" data-value="bank12">兴业银行</div>-->
                    <!--</li>-->
                    <!--<li>-->
                      <!--<div class="bank-selectable bank-text" data-value="bank13">深圳发展银行</div>-->
                    <!--</li>-->
                    <!--<li>-->
                      <!--<div class="bank-selectable bank-text" data-value="bank14">浦发银行</div>-->
                    <!--</li>-->
                    <!--<li>-->
                      <!--<div class="bank-selectable bank-text" data-value="bank15">广发银行</div>-->
                    <!--</li>-->
                    <!--<li>-->
                      <!--<div class="bank-selectable bank-text" data-value="bank16">杭州银行</div>-->
                    <!--</li>-->
                    <!--<li>-->
                      <!--<div class="bank-selectable bank-text" data-value="bank17">平安银行</div>-->
                    <!--</li>-->
                    <!--<li>-->
                      <!--<div class="bank-selectable bank-text" data-value="bank18">上海银行</div>-->
                    <!--</li>-->
                  <!--</ul>-->
                <!--</div>-->
              <!--</div>-->
            <!--</button>-->
            <input type="hidden" name="payment_type" id="payment_type">
          </div>

          <div class="form-group" style="display: block;" id="payment_id">
              <div class="checkbox">
                <label>
                  <input type="checkbox" id="agreement" name="agreement" value="" checked>
                  我已阅读并已同意<a href="http://www.kaikeba.comhelp.html#user_agreement-anchor" style="color: #3d85cc;">开课吧服务协议</a>
                </label>
              </div>
    
              <button type="button" id="sub" class="btn btn-primary btn-lg"  data-course-id="321" data-lms-course-id="239">去支付</button>
          </div>
          <div class="form gift-form" style="display: none;" id="duihuanma_id">
            <div class="group" id="entityPanel" style="display: block;">
              <input id="couponKeyPressFirst" type="text" style="width: 64px;text-align: center;">
              <span class="label-dashes">-</span>
              <input id="couponKeyPressSecond" type="text" style="width: 64px;text-align: center;">
              <span class="label-dashes">-</span>
              <input id="couponKeyPressThrid" type="text" style="width: 64px;text-align: center;">
              <span class="label-dashes">-</span>
              <input id="couponKeyPressFourth" type="text" style="width: 64px;text-align: center;">
              <input type="button" class="btn-add btn-1" id="entityCouponId" value="使用">
              <p><span class="desc text-warning" id="duihuanma_tishi">请输入您手中的兑换码</span></p>
            </div>
          </div>
          
        </form>


      </div>
    </div>
  </div>
</div>


<div class="modal fade" id="weixin-qrcode">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">微信支付</h4>
      </div>
      <div class="modal-body">
        <div class="text-center">
          <h4>论文排版速成宝典                 （Word2013）</h4>
          <h4 class="price">¥29</h4>
          <img src="images/weixin_pay_qrcode.jpg" alt=" " />
          <h3>微信扫描，完成支付</h3>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="modal fade" id="duihuanma-qrcode">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="modal_title">购买课程</h4>
      </div>
      <div class="modal-body">
        <div class="text-center" style="margin-top: 60px;">
          <img src="images/pay_success.png" alt=" " />&nbsp;&nbsp;&nbsp;&nbsp;兑换码已成功使用
        </div>
        <p></p>
        <p style="text-align: center; margin-bottom: 30px; margin-top: 60px;"><a id="go_btn" href="404.html" type="button" class="btn btn-primary btn-lg" >
          查看课程
       </a></p>
       <p></p>
      </div>
    </div>
  </div>
</div>



<!--<script type="text/javascript" src="js/jquery.min.js"></script>-->
<!--<script type="text/javascript" src="js/bootstrap.min.js"></script>-->
<!--<script type="text/javascript" src="js/jquery.flexslider-min.js"></script>-->
<!--<script type="text/javascript" src="js/jquery.dotdotdot.min.js"></script>-->
<!--<script type="text/javascript" src="js/jquery.placeholder.js"></script>-->
<!--<script type="text/javascript" src="js/global.js"></script>-->
<script>
    $(function () {
        var webApiUrl = "http://w.api.kaikeba.com";
        
        $('#sub').click(function(){
            var flag = $('#agreement').is(':checked');
            if (flag){
                if (!!!$('#payment_type').val()){
                    alert('请选择支付方式，谢谢');
                    return false;
                }else if ($('#payment_type').val() != "weixin"){
                    $('#buy_success').data('course-id', $(this).data('course-id'));
                    $('#buy_success').data('lms-course-id', $(this).data('lms-course-id'));
                    $('#buy-open-course2').modal('hide');
                    $('#buy-course-modal').modal('show');
                    document.forms[1].target='_blank';
                    document.forms[1].submit();
                }
            }else{
                alert("请同意开课吧服务协议");
                return false;
            }
        });

        $('body').addClass('bg-gray');
        var radioGroups = $('.radio-group');
        $.each(radioGroups, function(index, radioGroup) {
            var $hiddenInput = $('#payment_type');
            $(radioGroup).on('click', '.radio-btn', function(event) {
                event.preventDefault();
                if($(this).data('value') == " ") return;

                $hiddenInput.val($(this).data('value'));

                $(this).addClass('checked');
                $(this).siblings('.radio-btn').removeClass('checked');
                
                if ($(this).attr('data-value')=='alipay') {
                    $('#payment_id').css('display', 'block');
                    $('#duihuanma_id').css('display', 'none');
                } else {
                    $('#payment_id').css('display', 'none');
                    $('#duihuanma_id').css('display', 'block');
                }
            });
        });

        $('#sub').click(function(event) {
            event.preventDefault();
            if($('#payment_type').val() == "weixin") {
                $('#weixin-qrcode').modal('show');
            }
        });

        $('.bank-selectable').click(function() {
            $('.bank-selectable.active').removeClass('active');
            $(this).addClass('active');

            $('#payment_type').val($(this).data('value'));

            $('#bank-selected .content').html($(this).html());
            $('#bank-selected .content').find('.bank-icon').addClass('small');
            $('.btn-pay.checked').removeClass('checked');
            $('#bank-selected').addClass('checked');

            $('.banks-blk').fadeOut(0, function() {
                setTimeout(function() {
                    $('.banks-blk').css('display', '');
                }, 200);
            });
        });
        
        // $("input").trigger("focus");
        $('#entityPanel input[type="text"]').bind('input propertychange', function(e) {
            if ($(this).attr('id') == 'couponKeyPressFirst' && $(this).val().length == 19) {
                var val = $(this).val().split('-');
                $("#couponKeyPressFirst").val(val[0]);
                $("#couponKeyPressSecond").val(val[1]);
                $("#couponKeyPressThrid").val(val[2]);
                $("#couponKeyPressFourth").val(val[3]);
                $("#entityCouponId").trigger("focus");
            } else if ($(this).val().length >= 4) {
                switch ($(this).attr('id')){
                    case 'couponKeyPressFirst':
                        $("#couponKeyPressFirst").val($("#couponKeyPressFirst").val().substr(0,4));
                        $("#couponKeyPressSecond").val('');
                        $("#couponKeyPressSecond").trigger("focus");
                        break;
                    case 'couponKeyPressSecond':
                        $("#couponKeyPressSecond").val($("#couponKeyPressSecond").val().substr(0,4));
                        $("#couponKeyPressThrid").val('');
                        $("#couponKeyPressThrid").trigger("focus");
                        break;
                    case 'couponKeyPressThrid':
                        $("#couponKeyPressThrid").val($("#couponKeyPressThrid").val().substr(0,4));
                        $("#couponKeyPressFourth").val('');
                        $("#couponKeyPressFourth").trigger("focus");
                        break;
                    case 'couponKeyPressFourth':
                        $("#couponKeyPressFourth").val($("#couponKeyPressFourth").val().substr(0,4));
                        $("#entityCouponId").trigger("focus");
                        break;
                }
            };
            $('#duihuanma_tishi').html('请输入您手中的兑换码');
            $('#duihuanma_tishi').attr('class', 'desc text-warning');
        });
        //DDDD-DDDD-DDDD-DDDD
        //DDDDDDDDDDDDDDDD
        
        $("#entityCouponId").on('click', function(){
            var val1= $("#couponKeyPressFirst").val();
            var val2= $("#couponKeyPressSecond").val();
            var val3= $("#couponKeyPressThrid").val();
            var val4= $("#couponKeyPressFourth").val();
            var access_token = null;
              for (var i=0; i < arrStr.length; i++) {
                if (arrStr[i].split("=")[0] === 'access_token') {
                    access_token = unescape(arrStr[i].split("=")[1]);
                };
              };
            if ($.trim(val1).length==4 && $.trim(val2).length==4 && $.trim(val3).length==4 && $.trim(val4).length==4 && access_token) {
                $.ajax({
                    url : webApiUrl+'/redeem_codes/redeem/'+val1+val2+val3+val4+'?access_token='+access_token+'&course_id='+321,
                    type : 'GET',
                    contentType : 'application/json',
                    success : function(back){
                        if (back.status) {
                            if (back.data.valid) {
                                $('#duihuanma-qrcode').modal('show');
                                $('#go_btn').attr('href', '/courses/'+321);
                                $.ajax({
                                    url : '/api/v4/redeem_codes/verified',
                                    type : 'POST',
                                    contentType : 'application/json',
                                    data : JSON.stringify({
                                        "course_id":321,
                                        "number":val1+val2+val3+val4,
                                        "lms_course_id":239,
                                        "lms_type":"kaikeba",
                                        "status": true
                                    }),
                                    success : function(callback){
                                        //console.log(callback)
                                    }
                                });
                            } else {
                                $('#duihuanma_tishi').html(back.data.invalid_reason);
                                $('#duihuanma_tishi').attr('class', 'desc text-danger');
                                $.ajax({
                                    url : '/api/v4/redeem_codes/verified',
                                    type : 'POST',
                                    contentType : 'application/json',
                                    data : JSON.stringify({
                                        "course_id":321,
                                        "number":val1+val2+val3+val4,
                                        "lms_course_id":239,
                                        "lms_type":"kaikeba",
                                        "status": false
                                    }),
                                    success : function(callback){
                                        //console.log(callback)
                                    }
                                });
                            }
                        };
                    }
                });
            } else {
                $('#duihuanma_tishi').html('请输入正确格式兑换码，如：DDDD-DDDD-DDDD-DDDD');
                $('#duihuanma_tishi').attr('class', 'desc text-danger');
            }
        })
    });
</script>

    <script type="text/javascript">
        $('.buy_course').click(function(){
            $('#buy_success').data('course-id', $(this).data('course-id'));
            $('#buy_success').data('lms-course-id', $(this).data('lms-course-id'));
            $('#buy-open-course2').modal('hide');
            $('#buy-course-modal').modal('show');
        });
    </script>
    <div class="modal fade guide-course-modal" id="buy-course-modal">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title">购买课程</h4>
          </div>
          <div class="modal-body">
            <p class="buy-hint">请在新打开的页面完成支付，<br><span class="text-danger">支付完成前，请不要关闭此窗口。</span></p>

            <p>支付完成后请根据您的情况点击下面的按钮：</p>
            <button type="button" class="btn btn-lg btn-primary" id="buy_success">已完成支付</button>
            <button type="button" class="btn btn-lg btn-default" data-dismiss="modal">支付失败，重新购买</button>

          </div>
        </div><!-- /.modal-content -->
      </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->

    <div class="modal fade guide-course-modal" id="buy-success-modal">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title">购买课程</h4>
          </div>
          <div class="modal-body text-center">
            <p class="fail-hint">支付失败，请尝试重新购买！</p>
            <button type="button" class="btn btn-lg btn-primary" data-dismiss="modal">好的</button>
          </div>
        </div><!-- /.modal-content -->
      </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->

    <script type="text/javascript">
        $('#buy_success').click(function(){
            $.get('/courses/has_buy', {course_id: $('#buy_success').data('course-id'), lms_course_id: $('#buy_success').data('lms-course-id')}, function(response){
                if(response.status == 'failure'){
                    $('#buy-course-modal').modal('hide');
                    $('#buy-success-modal').modal('show');
                }else{
                    window.location.href = "/courses/" + $('#buy_success').data('course-id');
                }
            });
        });
    </script>

        <footer class="footer" id="footer">
  <div class="links">
    <div class="container">
      <div class="row">
        <div class="col-xs-2">
          <div class="logo">
            <img src="images/logo-white.png" alt="">
          </div>
        </div>
        <div class="col-xs-5">
          <div class="row">
            <div class="col-xs-3">
              <h5>关于我们</h5>
              <ul class="list-unstyled">
                <li><a href="about.html#advantage-anchor">我们的优势</a></li>
                <li><a href="about.html#news-anchor">资讯报道</a></li>
                <li><a href="about.html#joinus-anchor">加入我们</a></li>
                <li><a href="about.html#contact-anchor">联系我们</a></li>
              </ul>
            </div>
            <div class="col-xs-3">
              <h5>产品&amp;服务</h5>
              <ul class="list-unstyled">
                <li><a href="products.html#production_intro-anchor">产品介绍</a></li>
                <li><a href="products.html#institution_cooperate-anchor">校企合作</a></li>
                <li><a href="products.html#business_cooperate-anchor">商务合作</a></li>
              </ul>
            </div>
            <div class="col-xs-3">
              <h5>帮助中心</h5>
              <ul class="list-unstyled">
                <li><a href="help.html#common_question-anchor">常见问题</a></li>
                <li><a href="help.html#contact_customer-anchor">联系客服</a></li>
                <li><a href="help.html#user_agreement-anchor">服务协议</a></li>
                <li><a href="help.html#copyright_explain-anchor">隐私政策</a></li>
              </ul>
            </div>
            <div class="col-xs-3">
              <h5>优质资源</h5>
              <ul class="list-unstyled">
                <li><a href="/instructors">优秀讲师</a></li>
                <li><a href="course_list.html">全部课程</a></li>
                <li><a href="/good_resource#cooperate_platform">合作平台</a></li>
                <li><a href="/verifies">证书验证</a></li>
              </ul>
            </div>
          </div>
        </div>
        <div class="col-xs-4 pull-right social-media">
          <div class="row">
            <div class="col-xs-7">
              <a href="http://bbs.kaikeba.com" class="btn btn-lg btn-block btn-gflt" target="_blank">
                <span><img src="images/gflt_logo.png" alt=""></span>
                &nbsp;&nbsp;官方论坛
              </a>
              <a href="http://weibo.com/kaikeba" class="btn btn-lg btn-block btn-weibo" target="_blank">
                <span><img src="images/weibo_logo.png" alt=""></span>
                &nbsp;&nbsp;立即关注
              </a>
              <a href="http://t.qq.com/kaikeba" class="btn btn-lg btn-block btn-douban" target="_blank">
                <span><img src="images/douban_logo.png" alt=""></span>
                &nbsp;&nbsp;立即收听
              </a>
            </div>
            <div class="col-xs-5">
              <img src="images/weixin-QR-footer.png" alt="" class="weixin-QR">
              <!--<a href="404.html"><img src="images/QQ_talk.png" alt=""></a>-->
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="copyright text-center">
    <p>北京开云慧科网络科技有限公司版权所有&nbsp;&nbsp;&nbsp;<a href="https://tsm.miit.gov.cn/pages/Portal.aspx?uKey=ukey" target="_blank">京ICP证140465号</a>&nbsp;&nbsp;&nbsp;<a href="http://www.miitbeian.gov.cn/publish/query/indexFirst.action" target="_blank">京ICP备13032407号-1</a>&nbsp;&nbsp;&nbsp;京公网安备 11010802013162</p>
    <p>公司地址：北京市海淀区学院路35号世宁大厦302A&nbsp;&nbsp;邮箱：kefu@kaikeba.com</p>
  </div>
</footer>
<!-- Piwik -->


<!-- Google Code for &#27880;&#20876; Conversion Page -->
<script type="text/javascript">
    /* <![CDATA[ */
    var google_conversion_id = 983566162;
    var google_conversion_language = "en";
    var google_conversion_format = "2";
    var google_conversion_color = "ffffff";
    var google_conversion_label = "wTJBCL7Q9gcQ0o6A1QM";
    var google_remarketing_only = false;
    /* ]]> */
</script>
<div style="display: none;">
  <script type="text/javascript" src="js/conversion.js">
  </script>
  <noscript>
    <div style="display:inline;">
      <img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/983566162/?label=wTJBCL7Q9gcQ0o6A1QM&amp;guid=ON&amp;script=0"/>
    </div>
  </noscript>

  <script type="text/javascript">
      $(document).ready(function(){
          var src_url = window.location.href;
          $("[click_source]").each(function(){
              var src_ele_value = $(this).attr("click_source");
              var tag_name = $(this).prop('tagName');
              if (tag_name == 'UL') {
                  $(this).find("a").each(function (index) {
                      $(this).click(function () {
                          var des_url = $(this).attr("href");
                          _paq.push(['setCustomVariable', '1', 'user_click', src_ele_value + '||' + index + '||' + src_url + '||' + des_url, 'page']);
                          _paq.push(['trackPageView']);
                      });
                  });
              }else if (tag_name == 'A') {
                  $(this).click(function () {
                      var des_url = $(this).attr("href");
                      _paq.push(['setCustomVariable', '1', 'user_click', src_ele_value + '||' + src_url + '||' + des_url, 'page']);
                      _paq.push(['trackPageView']);
                  });
              }else if (tag_name == 'INPUT'){
                  $(this).click(function () {
                      _paq.push(['setCustomVariable', '1', 'user_click', src_ele_value + '||' + src_url, 'page']);
                      _paq.push(['trackPageView']);
                  });
              }

          })
      });
  </script>
  <script src="js/monitorView-2.0.js"></script>
  <noscript><p><img src="http://piwik.kaikeba.com/piwik/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>

  <!--<!-- ask Li,Wenchao adn Ren,Shiqi-->-->
  <!--<script type="text/javascript" src="http://tj.ranknowcn.com/tj/t.php?site=1101"></script>-->
</div>
<!-- End Piwik Code -->


<!--[if IE 8]>
<script>
    if(!!!$.cookie('ie8-bootstrap-warning')){
        $('body').prepend('<div class="alert alert-danger alert-dismissible fade in text-center" id="ie8-bootstrap-warning" style="border-color: #d84a36; background:#d84a36;color:white;position: absolute; z-index: 9999; width: 100%;" role="alert">'
                + '<button type="button" class="close" data-dismiss="alert" aria-label="关闭" style="position: absolute; right: 10px; margin-right: 0px;"><span aria-hidden="true">×</span></button>'
                + '使用IE8及以下版本可能会对你使用网站部分功能造成影响，请使用更高版本或者chrome浏览器'
                + '</div>');
        $('#ie8-bootstrap-warning').on('closed.bs.alert', function () {
            $.cookie('ie8-bootstrap-warning', 'true');
        })
    }
</script>
<![endif]-->

<!--[if lt IE 8]>
<script>
    if(!!!$.cookie('ie8-bootstrap-warning')){
        $('body').prepend('<div class="alert alert-danger alert-dismissible fade in text-center" id="ie8-bootstrap-warning" style="border-color: #d84a36; background:#d84a36;color:white;position: absolute; z-index: 9999; width: 100%;" role="alert">'
                + '<button type="button" class="close" data-dismiss="alert" aria-label="关闭" style="position: absolute; right: 10px; width: 100px; padding-right: 10px; height: 30px; margin-right: 0px;"><span aria-hidden="true">×</span></button>'
                + '使用IE8及以下版本可能会对你使用网站部分功能造成影响，请使用更高版本或者chrome浏览器'
                + '</div>');
        $('#ie8-bootstrap-warning').on('closed.bs.alert', function () {
            $.cookie('ie8-bootstrap-warning', 'true');
        })
    }
</script>
<![endif]-->





        <!--<a click_source="bugs_entrance" class="bugs-entrance" href="http://www.kaikeba.com/activities/christmas-newyear?qtm=christmas&amp;source=floating_window">-->
          <!--<span class="close-bugs-entrance"></span>-->
        <!--</a>-->
        <script>
//          $('.close-bugs-entrance').click(function(event) {
//            event.preventDefault();
//            event.stopPropagation();
//            $(this).parent().remove();
//          });
        </script>

  </body>
</html>
<!--
本代码由js代码网网友上传，js代码网收集并编辑整理;
尊重他人劳动成果;
转载请保留js代码链接 - www.jsdaima.com
-->